cmake_minimum_required(VERSION 3.10)

# 忽略代码中的中文注释引起的MSVC编译器警告
if(MSVC)
    add_compile_options(/source-charset:utf-8)
    add_compile_options(/execution-charset:utf-8)
endif()

set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)

set(PROJECT_NAME "demo2")
project(${PROJECT_NAME} VERSION 1.0.0)

find_package(Poco REQUIRED COMPONENTS Foundation Util)
set(PCL_DIR "/home/school/lib/pcl-1.13/share/pcl-1.13")
find_package(PCL 1.13.1 REQUIRED COMPONENTS io)

CollectSourceFiles(${CMAKE_CURRENT_SOURCE_DIR} PRIVATE_SOURCES)
add_executable(${PROJECT_NAME} ${PRIVATE_SOURCES})

#依赖库连接
target_include_directories(${PROJECT_NAME} PUBLIC ${PCL_INCLUDE_DIRS})

target_link_libraries(${PROJECT_NAME} PUBLIC isc-lib-lidar Poco::Util Poco::Foundation)
target_link_libraries(${PROJECT_NAME} PRIVATE ${PCL_LIBRARIES})